import VueRouter from 'vue-router'
//导入对应的路由组件
import home from './components/home.vue'
import member from './components/member.vue'
import shopping from './components/shopping.vue'
import serach from './components/serach.vue'
import news from './components/news.vue'
import newsdetail from './components/newsdetail.vue'
import photo from './components/photo.vue'
// 创建路由对象
const router = new VueRouter({
    routes: [
        // 配置对应的路由组件
        { path: '/', redirect: '/home' },
        { path: '/home', component: home},
        { path: '/member', component: member },
        { path: '/shopping', component: shopping },
        { path: '/serach', component: serach },
        { path: '/home/news', component: news },
        { path: '/home/news/newsdetail', component: newsdetail },
        { path: '/home/photo', component: photo },
    ],
    linkActiveClass: 'mui-active'


})
export default router;